var apprain_sliding_menu ={
	opacity: ".4",
	slide_wrapper: '.glitter',
	element: ".box",
	nodeObject : null,
	fadeOnload	   : false,
	clearOnMoveout : true,
	menuActive : function()
	{
		apprain_sliding_menu.inactiveAll();
		this.get('tween', {property: 'opacity', duration: 700}).start(1);
	},
	menuInActive : function()
	{
		this.get('tween', {property: 'opacity', duration: 500}).start(apprain_sliding_menu.opacity);

		if( apprain_sliding_menu.clearOnMoveout )
		{
			apprain_sliding_menu.activeAll();
		}
	},
	inactiveAll: function ()
	{
		apprain_sliding_menu.nodeObject.each(function(e1)
		{
			e1.get('tween', {property: 'opacity', duration: 500}).start(apprain_sliding_menu.opacity);
		});

	},
	activeAll: function ()
	{
		apprain_sliding_menu.nodeObject.each(function(e1)
		{
			e1.get('tween', {property: 'opacity', duration: 500}).start(1);
		});
	},
	init: function(){
		
		apprain_sliding_menu.nodeObject = $$(apprain_sliding_menu.slide_wrapper).getElements(apprain_sliding_menu.element)[0];

		if( apprain_sliding_menu.fadeOnload )
		{
			apprain_sliding_menu.inactiveAll();
		}
		
		apprain_sliding_menu.nodeObject.each(function(e1)
		{
			e1.setStyle('cursor','pointer');
			e1.addEvent('mouseenter', apprain_sliding_menu.menuActive);
			e1.addEvent('mouseleave', apprain_sliding_menu.menuInActive);
		});
	}
}
window.addEvent('domready', apprain_sliding_menu.init);